<?php
$tdataroles=array();
	$tdataroles[".NumberOfChars"]=80; 
	$tdataroles[".ShortName"]="roles";
	$tdataroles[".OwnerID"]="";
	$tdataroles[".OriginalTable"]="roles";


	
//	field labels
$fieldLabelsroles = array();
if(mlang_getcurrentlang()=="English")
{
	$fieldLabelsroles["English"]=array();
	$fieldToolTipsroles["English"]=array();
	$fieldLabelsroles["English"]["id"] = "Id";
	$fieldToolTipsroles["English"]["id"] = "";
	$fieldLabelsroles["English"]["role_name"] = "Role Name";
	$fieldToolTipsroles["English"]["role_name"] = "";
	if (count($fieldToolTipsroles["English"])){
		$tdataroles[".isUseToolTips"]=true;
	}
}
if(mlang_getcurrentlang()=="Chinese (Hong Kong S.A.R.)")
{
	$fieldLabelsroles["Chinese (Hong Kong S.A.R.)"]=array();
	$fieldToolTipsroles["Chinese (Hong Kong S.A.R.)"]=array();
	$fieldLabelsroles["Chinese (Hong Kong S.A.R.)"]["id"] = "Id";
	$fieldToolTipsroles["Chinese (Hong Kong S.A.R.)"]["id"] = "";
	$fieldLabelsroles["Chinese (Hong Kong S.A.R.)"]["role_name"] = "Role Name";
	$fieldToolTipsroles["Chinese (Hong Kong S.A.R.)"]["role_name"] = "";
	if (count($fieldToolTipsroles["Chinese (Hong Kong S.A.R.)"])){
		$tdataroles[".isUseToolTips"]=true;
	}
}
if(mlang_getcurrentlang()=="Chinese (Taiwan)")
{
	$fieldLabelsroles["Chinese (Taiwan)"]=array();
	$fieldToolTipsroles["Chinese (Taiwan)"]=array();
	$fieldLabelsroles["Chinese (Taiwan)"]["id"] = "Id";
	$fieldToolTipsroles["Chinese (Taiwan)"]["id"] = "";
	$fieldLabelsroles["Chinese (Taiwan)"]["role_name"] = "Role Name";
	$fieldToolTipsroles["Chinese (Taiwan)"]["role_name"] = "";
	if (count($fieldToolTipsroles["Chinese (Taiwan)"])){
		$tdataroles[".isUseToolTips"]=true;
	}
}
if(mlang_getcurrentlang()=="French")
{
	$fieldLabelsroles["French"]=array();
	$fieldToolTipsroles["French"]=array();
	$fieldLabelsroles["French"]["id"] = "Id";
	$fieldToolTipsroles["French"]["id"] = "";
	$fieldLabelsroles["French"]["role_name"] = "Role Name";
	$fieldToolTipsroles["French"]["role_name"] = "";
	if (count($fieldToolTipsroles["French"])){
		$tdataroles[".isUseToolTips"]=true;
	}
}


	
	$tdataroles[".NCSearch"]=true;

	

$tdataroles[".shortTableName"] = "roles";
$tdataroles[".nSecOptions"] = 0;
$tdataroles[".recsPerRowList"] = 1;	
$tdataroles[".tableGroupBy"] = "0";
$tdataroles[".mainTableOwnerID"] = "";
$tdataroles[".moveNext"] = 1;




$tdataroles[".showAddInPopup"] = false;

$tdataroles[".showEditInPopup"] = false;

$tdataroles[".showViewInPopup"] = false;


$tdataroles[".fieldsForRegister"] = array();

$tdataroles[".listAjax"] = true;

	$tdataroles[".audit"] = false;

	$tdataroles[".locking"] = false;
	
$tdataroles[".listIcons"] = true;
$tdataroles[".edit"] = true;
$tdataroles[".inlineEdit"] = true;
$tdataroles[".view"] = true;

$tdataroles[".exportTo"] = true;

$tdataroles[".printFriendly"] = true;

$tdataroles[".delete"] = true;

$tdataroles[".showSimpleSearchOptions"] = true;

$tdataroles[".showSearchPanel"] = true;


$tdataroles[".isUseAjaxSuggest"] = true;

$tdataroles[".rowHighlite"] = true;


// button handlers file names

$tdataroles[".addPageEvents"] = false;

$tdataroles[".arrKeyFields"][] = "id";

// use datepicker for search panel
$tdataroles[".isUseCalendarForSearch"] = false;

// use timepicker for search panel
$tdataroles[".isUseTimeForSearch"] = false;

$tdataroles[".isUseiBox"] = false;



$tdataroles[".isUseInlineAdd"] = true;

$tdataroles[".isUseInlineEdit"] = true;
$tdataroles[".isUseInlineJs"] = $tdataroles[".isUseInlineAdd"] || $tdataroles[".isUseInlineEdit"];

$tdataroles[".allSearchFields"] = array();

$tdataroles[".globSearchFields"][] = "id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("id", $tdataroles[".allSearchFields"]))
{
	$tdataroles[".allSearchFields"][] = "id";	
}
$tdataroles[".globSearchFields"][] = "role_name";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("role_name", $tdataroles[".allSearchFields"]))
{
	$tdataroles[".allSearchFields"][] = "role_name";	
}


$tdataroles[".googleLikeFields"][] = "id";
$tdataroles[".googleLikeFields"][] = "role_name";



$tdataroles[".advSearchFields"][] = "id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("id", $tdataroles[".allSearchFields"])) 
{
	$tdataroles[".allSearchFields"][] = "id";	
}
$tdataroles[".advSearchFields"][] = "role_name";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("role_name", $tdataroles[".allSearchFields"])) 
{
	$tdataroles[".allSearchFields"][] = "role_name";	
}

$tdataroles[".isTableType"] = "list";


	

$tdataroles[".isDisplayLoading"] = true;

$tdataroles[".isResizeColumns"] = false;





$tdataroles[".pageSize"] = 20;

$gstrOrderBy = "";
if(strlen($gstrOrderBy) && strtolower(substr($gstrOrderBy,0,8))!="order by")
	$gstrOrderBy = "order by ".$gstrOrderBy;
$tdataroles[".strOrderBy"] = $gstrOrderBy;
	
$tdataroles[".orderindexes"] = array();

$tdataroles[".sqlHead"] = "SELECT id,   role_name";
$tdataroles[".sqlFrom"] = "FROM roles";
$tdataroles[".sqlWhereExpr"] = "";
$tdataroles[".sqlTail"] = "";




//fill array of records per page for list and report without group fields
$arrRPP = array();
$arrRPP[] = 10;
$arrRPP[] = 20;
$arrRPP[] = 30;
$arrRPP[] = 50;
$arrRPP[] = 100;
$arrRPP[] = 500;
$arrRPP[] = -1;
$tdataroles[".arrRecsPerPage"] = $arrRPP;

//fill array of groups per page for report with group fields
$arrGPP = array();
$arrGPP[] = 1;
$arrGPP[] = 3;
$arrGPP[] = 5;
$arrGPP[] = 10;
$arrGPP[] = 50;
$arrGPP[] = 100;
$arrGPP[] = -1;
$tdataroles[".arrGroupsPerPage"] = $arrGPP;

	$tableKeys = array();
	$tableKeys[] = "id";
	$tdataroles[".Keys"] = $tableKeys;

//	id
	$fdata = array();
	$fdata["strName"] = "id";
	$fdata["ownerTable"] = "roles";
		$fdata["Label"]="Id"; 
	
		
		
	$fdata["FieldType"]= 3;
	
		$fdata["AutoInc"]=true;
	
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "id";
	
		$fdata["FullName"]= "id";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 1;
				$fdata["EditParams"]="";
			
		$fdata["bListPage"]=true; 
	
		
		
		
		
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataroles["id"]=$fdata;
//	role_name
	$fdata = array();
	$fdata["strName"] = "role_name";
	$fdata["ownerTable"] = "roles";
		$fdata["Label"]="Role Name"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "role_name";
	
		$fdata["FullName"]= "role_name";
	
		
		
		
		
		
				$fdata["Index"]= 2;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=255";
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataroles["role_name"]=$fdata;

	
$tables_data["roles"]=&$tdataroles;
$field_labels["roles"] = &$fieldLabelsroles;
$fieldToolTips["roles"] = &$fieldToolTipsroles;

// -----------------start  prepare master-details data arrays ------------------------------//
// tables which are detail tables for current table (master)
$detailsTablesData["roles"] = array();

	
// tables which are master tables for current table (detail)
$masterTablesData["roles"] = array();

// -----------------end  prepare master-details data arrays ------------------------------//

require_once(getabspath("classes/sql.php"));










$proto473=array();
$proto473["m_strHead"] = "SELECT";
$proto473["m_strFieldList"] = "id,   role_name";
$proto473["m_strFrom"] = "FROM roles";
$proto473["m_strWhere"] = "";
$proto473["m_strOrderBy"] = "";
$proto473["m_strTail"] = "";
$proto474=array();
$proto474["m_sql"] = "";
$proto474["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto474["m_column"]=$obj;
$proto474["m_contained"] = array();
$proto474["m_strCase"] = "";
$proto474["m_havingmode"] = "0";
$proto474["m_inBrackets"] = "0";
$proto474["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto474);

$proto473["m_where"] = $obj;
$proto476=array();
$proto476["m_sql"] = "";
$proto476["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto476["m_column"]=$obj;
$proto476["m_contained"] = array();
$proto476["m_strCase"] = "";
$proto476["m_havingmode"] = "0";
$proto476["m_inBrackets"] = "0";
$proto476["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto476);

$proto473["m_having"] = $obj;
$proto473["m_fieldlist"] = array();
						$proto478=array();
			$obj = new SQLField(array(
	"m_strName" => "id",
	"m_strTable" => "roles"
));

$proto478["m_expr"]=$obj;
$proto478["m_alias"] = "";
$obj = new SQLFieldListItem($proto478);

$proto473["m_fieldlist"][]=$obj;
						$proto480=array();
			$obj = new SQLField(array(
	"m_strName" => "role_name",
	"m_strTable" => "roles"
));

$proto480["m_expr"]=$obj;
$proto480["m_alias"] = "";
$obj = new SQLFieldListItem($proto480);

$proto473["m_fieldlist"][]=$obj;
$proto473["m_fromlist"] = array();
												$proto482=array();
$proto482["m_link"] = "SQLL_MAIN";
			$proto483=array();
$proto483["m_strName"] = "roles";
$proto483["m_columns"] = array();
$proto483["m_columns"][] = "id";
$proto483["m_columns"][] = "role_name";
$obj = new SQLTable($proto483);

$proto482["m_table"] = $obj;
$proto482["m_alias"] = "";
$proto484=array();
$proto484["m_sql"] = "";
$proto484["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto484["m_column"]=$obj;
$proto484["m_contained"] = array();
$proto484["m_strCase"] = "";
$proto484["m_havingmode"] = "0";
$proto484["m_inBrackets"] = "0";
$proto484["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto484);

$proto482["m_joinon"] = $obj;
$obj = new SQLFromListItem($proto482);

$proto473["m_fromlist"][]=$obj;
$proto473["m_groupby"] = array();
$proto473["m_orderby"] = array();
$obj = new SQLQuery($proto473);

$queryData_roles = $obj;
$tdataroles[".sqlquery"] = $queryData_roles;

$tableEvents["roles"] = new eventsBase;

?>
